<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<!--
		TODO this file is too simple to express the table contents, will be
		refactor soon.
	-->
	<xsl:template match="/table">
		<html>
			<head>
				<title>
					Table:
					<xsl:value-of select="name" />
				</title>
			</head>
			<body>
				Table:
				<xsl:value-of select="name" />
				<br />
				Description:
				<xsl:value-of select="desc[@lang='zh_CN']" />
				<table border="1">
					<thead>
						<th>Name</th>
						<th>Type</th>
						<th>PK/FK</th>
						<th>NULLABLE</th>
						<th>Description</th>
					</thead>
					<xsl:for-each select="columns/column">
						<tr>
							<td>
								<xsl:value-of select="id" />
							</td>
							<td>
								<xsl:value-of select="type" />
							</td>
							<td>
								<xsl:value-of select="@pk" />
							</td>
							<td>
								<xsl:value-of select="@nullable" />
							</td>
							<td>
								<xsl:value-of select="desc[@lang='zh_CN']" />
							</td>
						</tr>
					</xsl:for-each>
				</table>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>